/**************************************************************************
Copyright (C) jianbo miao Corporation.  All Rights Released.
this is a 3d engin named our_3d_engin.
our_3d_engin feature:
1:there is no float.
2:it do the 3d things all by softwear.
3:base on 1 and 2 , it can execution on arm which have no 3d hardwear accelerate.

  if you have any  suggestion or question,pls contact with me
  mail:miaojb@126.com
  msn:miaojianbo@hotmail.com
  qq:30209027
  
    2008/01/01
***************************************************************************/


#ifndef OUR_DRAW16
#define OUR_DRAW16

#include "our_cpu.h"
#include "our_math.h"
#include "our_3d.h"
//================================================================================================
//================================================================================================

int OUR_Draw_Line16(int x0, int y0, // starting position 
                    int x1, int y1, // ending position
                    int color,     // color index
                    UCHAR *vb_start, int lpitch); // video buffer and memory pitch

//int OUR_Clip_Line(int &x1,int &y1,int &x2, int &y2);
int OUR_Draw_Clip_Line16(int x0,int y0, int x1, int y1, int color, 
                         UCHAR *dest_buffer, int lpitch);
void OUR_Draw_Wire16( OUR_3D_OBJ_PTR	obj,UCHAR *video_buffer, int lpitch,int num);
void OUR_Draw_char16(CLR clor,char c,USHORT *dis_2, int lpitch);
void OUR_Draw_Text16(int x,int y,CLR clor,char *s,UCHAR *dis, int lpitch);
void OUR_Draw_BigText16(int x,int y,CLR clor,char *s,UCHAR *dis, int lpitch);
void OUR_sprintf(char *d,char *s,int a[]);
void OUR_Draw_bmp16_SBLT( int x1,int y1,int x2,int y2,
                                                        int x3,int y3,int x4,int y4,
                                                        UCHAR *video_buffer, int lpitch,
                                                        OUR_BMP_INFO* bmp);
void OUR_Draw_bmp16_SBLT_T( int x1,int y1,int x2,int y2,
                                                        int x3,int y3,int x4,int y4,
                                                        int t,
                                                        UCHAR *video_buffer, int lpitch,
                                                        OUR_BMP_INFO* bmp);
void OUR_Draw_falsh_board16(int x1,int y1,int x2,int y2,int width,
                                                        CLR C_start,CLR C_end,
                                                        UCHAR *video_buffer, int lpitch);
//================================================================================================
#endif
